/**
 * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package de.hsmannheim.pepa.patientenportal.apanwep.model;

import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.model.ModelWrapper;

import java.util.HashMap;
import java.util.Map;

/**
 * <p>
 * This class is a wrapper for {@link message}.
 * </p>
 *
 * @author Cedric Nana
 * @see message
 * @generated
 */
public class messageWrapper implements message, ModelWrapper<message> {
	public messageWrapper(message message) {
		_message = message;
	}

	@Override
	public Class<?> getModelClass() {
		return message.class;
	}

	@Override
	public String getModelClassName() {
		return message.class.getName();
	}

	@Override
	public Map<String, Object> getModelAttributes() {
		Map<String, Object> attributes = new HashMap<String, Object>();

		attributes.put("messageId", getMessageId());
		attributes.put("eventactioncode", getEventactioncode());
		attributes.put("eventdatetime", getEventdatetime());
		attributes.put("eventoutcome", getEventoutcome());
		attributes.put("sourceaddress", getSourceaddress());
		attributes.put("eventid_id", getEventid_id());

		return attributes;
	}

	@Override
	public void setModelAttributes(Map<String, Object> attributes) {
		Long messageId = (Long)attributes.get("messageId");

		if (messageId != null) {
			setMessageId(messageId);
		}

		String eventactioncode = (String)attributes.get("eventactioncode");

		if (eventactioncode != null) {
			setEventactioncode(eventactioncode);
		}

		String eventdatetime = (String)attributes.get("eventdatetime");

		if (eventdatetime != null) {
			setEventdatetime(eventdatetime);
		}

		Long eventoutcome = (Long)attributes.get("eventoutcome");

		if (eventoutcome != null) {
			setEventoutcome(eventoutcome);
		}

		String sourceaddress = (String)attributes.get("sourceaddress");

		if (sourceaddress != null) {
			setSourceaddress(sourceaddress);
		}

		Long eventid_id = (Long)attributes.get("eventid_id");

		if (eventid_id != null) {
			setEventid_id(eventid_id);
		}
	}

	/**
	* Returns the primary key of this message.
	*
	* @return the primary key of this message
	*/
	@Override
	public long getPrimaryKey() {
		return _message.getPrimaryKey();
	}

	/**
	* Sets the primary key of this message.
	*
	* @param primaryKey the primary key of this message
	*/
	@Override
	public void setPrimaryKey(long primaryKey) {
		_message.setPrimaryKey(primaryKey);
	}

	/**
	* Returns the message ID of this message.
	*
	* @return the message ID of this message
	*/
	@Override
	public long getMessageId() {
		return _message.getMessageId();
	}

	/**
	* Sets the message ID of this message.
	*
	* @param messageId the message ID of this message
	*/
	@Override
	public void setMessageId(long messageId) {
		_message.setMessageId(messageId);
	}

	/**
	* Returns the eventactioncode of this message.
	*
	* @return the eventactioncode of this message
	*/
	@Override
	public java.lang.String getEventactioncode() {
		return _message.getEventactioncode();
	}

	/**
	* Sets the eventactioncode of this message.
	*
	* @param eventactioncode the eventactioncode of this message
	*/
	@Override
	public void setEventactioncode(java.lang.String eventactioncode) {
		_message.setEventactioncode(eventactioncode);
	}

	/**
	* Returns the eventdatetime of this message.
	*
	* @return the eventdatetime of this message
	*/
	@Override
	public java.lang.String getEventdatetime() {
		return _message.getEventdatetime();
	}

	/**
	* Sets the eventdatetime of this message.
	*
	* @param eventdatetime the eventdatetime of this message
	*/
	@Override
	public void setEventdatetime(java.lang.String eventdatetime) {
		_message.setEventdatetime(eventdatetime);
	}

	/**
	* Returns the eventoutcome of this message.
	*
	* @return the eventoutcome of this message
	*/
	@Override
	public long getEventoutcome() {
		return _message.getEventoutcome();
	}

	/**
	* Sets the eventoutcome of this message.
	*
	* @param eventoutcome the eventoutcome of this message
	*/
	@Override
	public void setEventoutcome(long eventoutcome) {
		_message.setEventoutcome(eventoutcome);
	}

	/**
	* Returns the sourceaddress of this message.
	*
	* @return the sourceaddress of this message
	*/
	@Override
	public java.lang.String getSourceaddress() {
		return _message.getSourceaddress();
	}

	/**
	* Sets the sourceaddress of this message.
	*
	* @param sourceaddress the sourceaddress of this message
	*/
	@Override
	public void setSourceaddress(java.lang.String sourceaddress) {
		_message.setSourceaddress(sourceaddress);
	}

	/**
	* Returns the eventid_id of this message.
	*
	* @return the eventid_id of this message
	*/
	@Override
	public long getEventid_id() {
		return _message.getEventid_id();
	}

	/**
	* Sets the eventid_id of this message.
	*
	* @param eventid_id the eventid_id of this message
	*/
	@Override
	public void setEventid_id(long eventid_id) {
		_message.setEventid_id(eventid_id);
	}

	@Override
	public boolean isNew() {
		return _message.isNew();
	}

	@Override
	public void setNew(boolean n) {
		_message.setNew(n);
	}

	@Override
	public boolean isCachedModel() {
		return _message.isCachedModel();
	}

	@Override
	public void setCachedModel(boolean cachedModel) {
		_message.setCachedModel(cachedModel);
	}

	@Override
	public boolean isEscapedModel() {
		return _message.isEscapedModel();
	}

	@Override
	public java.io.Serializable getPrimaryKeyObj() {
		return _message.getPrimaryKeyObj();
	}

	@Override
	public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
		_message.setPrimaryKeyObj(primaryKeyObj);
	}

	@Override
	public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
		return _message.getExpandoBridge();
	}

	@Override
	public void setExpandoBridgeAttributes(
		com.liferay.portal.model.BaseModel<?> baseModel) {
		_message.setExpandoBridgeAttributes(baseModel);
	}

	@Override
	public void setExpandoBridgeAttributes(
		com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
		_message.setExpandoBridgeAttributes(expandoBridge);
	}

	@Override
	public void setExpandoBridgeAttributes(
		com.liferay.portal.service.ServiceContext serviceContext) {
		_message.setExpandoBridgeAttributes(serviceContext);
	}

	@Override
	public java.lang.Object clone() {
		return new messageWrapper((message)_message.clone());
	}

	@Override
	public int compareTo(
		de.hsmannheim.pepa.patientenportal.apanwep.model.message message) {
		return _message.compareTo(message);
	}

	@Override
	public int hashCode() {
		return _message.hashCode();
	}

	@Override
	public com.liferay.portal.model.CacheModel<de.hsmannheim.pepa.patientenportal.apanwep.model.message> toCacheModel() {
		return _message.toCacheModel();
	}

	@Override
	public de.hsmannheim.pepa.patientenportal.apanwep.model.message toEscapedModel() {
		return new messageWrapper(_message.toEscapedModel());
	}

	@Override
	public de.hsmannheim.pepa.patientenportal.apanwep.model.message toUnescapedModel() {
		return new messageWrapper(_message.toUnescapedModel());
	}

	@Override
	public java.lang.String toString() {
		return _message.toString();
	}

	@Override
	public java.lang.String toXmlString() {
		return _message.toXmlString();
	}

	@Override
	public void persist()
		throws com.liferay.portal.kernel.exception.SystemException {
		_message.persist();
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}

		if (!(obj instanceof messageWrapper)) {
			return false;
		}

		messageWrapper messageWrapper = (messageWrapper)obj;

		if (Validator.equals(_message, messageWrapper._message)) {
			return true;
		}

		return false;
	}

	/**
	 * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
	 */
	public message getWrappedmessage() {
		return _message;
	}

	@Override
	public message getWrappedModel() {
		return _message;
	}

	@Override
	public void resetOriginalValues() {
		_message.resetOriginalValues();
	}

	private message _message;
}